import com.wago.entity.StuClass;
import com.wago.entity.Student;
import com.wago.mapper.StuClassMapper;
import com.wago.mapper.StudentMapper;
import com.wago.mybatis.MyHelper;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * Created by webrx on 2017-09-04.
 */
public class Demo {
    @Test
    public void aa(){
        MyHelper my=new MyHelper();
        SqlSession sql=my.getSession();
        StuClassMapper stu=sql.getMapper(StuClassMapper.class);
       StuClass st= stu.queryAll(1);
       System.out.println(st.getName());
       System.out.println("-----------------学生信息------------------");
       List<Student> li=st.getStudents();
       System.out.println(li);


    }
}
